package com.owdp.code.service;

import com.owdp.code.entity.Admin;
import com.owdp.code.mapper.AdminMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

@Service("AdminService")
public class AdminServiceImpl implements AdminService {

    @Resource
    AdminMapper adminMapper;
    //管理员登录
    @Override
    public String login(String anumber) {
        return adminMapper.findPasswordByNumber(anumber);
    }
    //管理员注册
    @Override
    public void regist(Admin admin) {
        adminMapper.insert(admin);
    }
    //注册工号重复验证
    @Override
    public int findAdminByNumber(String anumber) {
        return adminMapper.findAdminByNumber(anumber);
    }
}
